import java.io.File;
import java.io.IOException;
import java.util.Scanner;

public class Demo3 {
    public static void main(String[] args) throws IOException, InterruptedException {
        File file = new File("./test.txt");
        System.out.println(file.createNewFile());
        // 删除该文件  返回删除是否成功
        //System.out.println(file.delete());
        //在进程结束之后再进行删除操作
        Scanner sc = new Scanner(System.in);
        sc.nextInt();
        file.deleteOnExit();
        System.out.println(file.exists());

    }
}
